#pragma once
// MESSAGE SATS_REQUEST PACKING

#define MAVLINK_MSG_ID_SATS_REQUEST 175

MAVPACKED(
typedef struct __mavlink_sats_request_t {
 uint32_t sat_id; /*<   sat_id.*/
 float slon; /*<  satellite longitude.*/
 float llon; /*<  local longitude*/
 float llat; /*<  local latitude.*/
 float down_freq; /*<  down frequency(MHz).*/
 float down_symb; /*<  down symb.*/
 float down_polar; /*<  down polar.*/
 float up_freq; /*<  up frequency(MHz).*/
 float up_polar; /*<  up polar.*/
 float res1; /*<  res1.*/
 uint8_t cmd; /*<  the params of cmd.*/
 uint8_t name[64]; /*<   satellite name.*/
 uint8_t auto_gps; /*<  auto gps.*/
 uint8_t beacon; /*<   beacon mode.*/
 uint8_t res2; /*<  res2.*/
}) mavlink_sats_request_t;

#define MAVLINK_MSG_ID_SATS_REQUEST_LEN 108
#define MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN 108
#define MAVLINK_MSG_ID_175_LEN 108
#define MAVLINK_MSG_ID_175_MIN_LEN 108

#define MAVLINK_MSG_ID_SATS_REQUEST_CRC 239
#define MAVLINK_MSG_ID_175_CRC 239

#define MAVLINK_MSG_SATS_REQUEST_FIELD_NAME_LEN 64

#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_SATS_REQUEST { \
    175, \
    "SATS_REQUEST", \
    15, \
    {  { "cmd", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_sats_request_t, cmd) }, \
         { "sat_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sats_request_t, sat_id) }, \
         { "name", NULL, MAVLINK_TYPE_UINT8_T, 64, 41, offsetof(mavlink_sats_request_t, name) }, \
         { "slon", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sats_request_t, slon) }, \
         { "llon", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sats_request_t, llon) }, \
         { "llat", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sats_request_t, llat) }, \
         { "auto_gps", NULL, MAVLINK_TYPE_UINT8_T, 0, 105, offsetof(mavlink_sats_request_t, auto_gps) }, \
         { "beacon", NULL, MAVLINK_TYPE_UINT8_T, 0, 106, offsetof(mavlink_sats_request_t, beacon) }, \
         { "down_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_sats_request_t, down_freq) }, \
         { "down_symb", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_sats_request_t, down_symb) }, \
         { "down_polar", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_sats_request_t, down_polar) }, \
         { "up_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_sats_request_t, up_freq) }, \
         { "up_polar", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_sats_request_t, up_polar) }, \
         { "res1", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_sats_request_t, res1) }, \
         { "res2", NULL, MAVLINK_TYPE_UINT8_T, 0, 107, offsetof(mavlink_sats_request_t, res2) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_SATS_REQUEST { \
    "SATS_REQUEST", \
    15, \
    {  { "cmd", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_sats_request_t, cmd) }, \
         { "sat_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_sats_request_t, sat_id) }, \
         { "name", NULL, MAVLINK_TYPE_UINT8_T, 64, 41, offsetof(mavlink_sats_request_t, name) }, \
         { "slon", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_sats_request_t, slon) }, \
         { "llon", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_sats_request_t, llon) }, \
         { "llat", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_sats_request_t, llat) }, \
         { "auto_gps", NULL, MAVLINK_TYPE_UINT8_T, 0, 105, offsetof(mavlink_sats_request_t, auto_gps) }, \
         { "beacon", NULL, MAVLINK_TYPE_UINT8_T, 0, 106, offsetof(mavlink_sats_request_t, beacon) }, \
         { "down_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_sats_request_t, down_freq) }, \
         { "down_symb", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_sats_request_t, down_symb) }, \
         { "down_polar", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_sats_request_t, down_polar) }, \
         { "up_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_sats_request_t, up_freq) }, \
         { "up_polar", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_sats_request_t, up_polar) }, \
         { "res1", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_sats_request_t, res1) }, \
         { "res2", NULL, MAVLINK_TYPE_UINT8_T, 0, 107, offsetof(mavlink_sats_request_t, res2) }, \
         } \
}
#endif

/**
 * @brief Pack a sats_request message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param cmd  the params of cmd.
 * @param sat_id   sat_id.
 * @param name   satellite name.
 * @param slon  satellite longitude.
 * @param llon  local longitude
 * @param llat  local latitude.
 * @param auto_gps  auto gps.
 * @param beacon   beacon mode.
 * @param down_freq  down frequency(MHz).
 * @param down_symb  down symb.
 * @param down_polar  down polar.
 * @param up_freq  up frequency(MHz).
 * @param up_polar  up polar.
 * @param res1  res1.
 * @param res2  res2.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_sats_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t cmd, uint32_t sat_id, const uint8_t *name, float slon, float llon, float llat, uint8_t auto_gps, uint8_t beacon, float down_freq, float down_symb, float down_polar, float up_freq, float up_polar, float res1, uint8_t res2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SATS_REQUEST_LEN];
    _mav_put_uint32_t(buf, 0, sat_id);
    _mav_put_float(buf, 4, slon);
    _mav_put_float(buf, 8, llon);
    _mav_put_float(buf, 12, llat);
    _mav_put_float(buf, 16, down_freq);
    _mav_put_float(buf, 20, down_symb);
    _mav_put_float(buf, 24, down_polar);
    _mav_put_float(buf, 28, up_freq);
    _mav_put_float(buf, 32, up_polar);
    _mav_put_float(buf, 36, res1);
    _mav_put_uint8_t(buf, 40, cmd);
    _mav_put_uint8_t(buf, 105, auto_gps);
    _mav_put_uint8_t(buf, 106, beacon);
    _mav_put_uint8_t(buf, 107, res2);
    _mav_put_uint8_t_array(buf, 41, name, 64);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SATS_REQUEST_LEN);
#else
    mavlink_sats_request_t packet;
    packet.sat_id = sat_id;
    packet.slon = slon;
    packet.llon = llon;
    packet.llat = llat;
    packet.down_freq = down_freq;
    packet.down_symb = down_symb;
    packet.down_polar = down_polar;
    packet.up_freq = up_freq;
    packet.up_polar = up_polar;
    packet.res1 = res1;
    packet.cmd = cmd;
    packet.auto_gps = auto_gps;
    packet.beacon = beacon;
    packet.res2 = res2;
    mav_array_memcpy(packet.name, name, sizeof(uint8_t)*64);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SATS_REQUEST_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_SATS_REQUEST;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
}

/**
 * @brief Pack a sats_request message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param cmd  the params of cmd.
 * @param sat_id   sat_id.
 * @param name   satellite name.
 * @param slon  satellite longitude.
 * @param llon  local longitude
 * @param llat  local latitude.
 * @param auto_gps  auto gps.
 * @param beacon   beacon mode.
 * @param down_freq  down frequency(MHz).
 * @param down_symb  down symb.
 * @param down_polar  down polar.
 * @param up_freq  up frequency(MHz).
 * @param up_polar  up polar.
 * @param res1  res1.
 * @param res2  res2.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_sats_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint8_t cmd,uint32_t sat_id,const uint8_t *name,float slon,float llon,float llat,uint8_t auto_gps,uint8_t beacon,float down_freq,float down_symb,float down_polar,float up_freq,float up_polar,float res1,uint8_t res2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SATS_REQUEST_LEN];
    _mav_put_uint32_t(buf, 0, sat_id);
    _mav_put_float(buf, 4, slon);
    _mav_put_float(buf, 8, llon);
    _mav_put_float(buf, 12, llat);
    _mav_put_float(buf, 16, down_freq);
    _mav_put_float(buf, 20, down_symb);
    _mav_put_float(buf, 24, down_polar);
    _mav_put_float(buf, 28, up_freq);
    _mav_put_float(buf, 32, up_polar);
    _mav_put_float(buf, 36, res1);
    _mav_put_uint8_t(buf, 40, cmd);
    _mav_put_uint8_t(buf, 105, auto_gps);
    _mav_put_uint8_t(buf, 106, beacon);
    _mav_put_uint8_t(buf, 107, res2);
    _mav_put_uint8_t_array(buf, 41, name, 64);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SATS_REQUEST_LEN);
#else
    mavlink_sats_request_t packet;
    packet.sat_id = sat_id;
    packet.slon = slon;
    packet.llon = llon;
    packet.llat = llat;
    packet.down_freq = down_freq;
    packet.down_symb = down_symb;
    packet.down_polar = down_polar;
    packet.up_freq = up_freq;
    packet.up_polar = up_polar;
    packet.res1 = res1;
    packet.cmd = cmd;
    packet.auto_gps = auto_gps;
    packet.beacon = beacon;
    packet.res2 = res2;
    mav_array_memcpy(packet.name, name, sizeof(uint8_t)*64);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SATS_REQUEST_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_SATS_REQUEST;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
}

/**
 * @brief Encode a sats_request struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param sats_request C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_sats_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_sats_request_t* sats_request)
{
    return mavlink_msg_sats_request_pack(system_id, component_id, msg, sats_request->cmd, sats_request->sat_id, sats_request->name, sats_request->slon, sats_request->llon, sats_request->llat, sats_request->auto_gps, sats_request->beacon, sats_request->down_freq, sats_request->down_symb, sats_request->down_polar, sats_request->up_freq, sats_request->up_polar, sats_request->res1, sats_request->res2);
}

/**
 * @brief Encode a sats_request struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param sats_request C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_sats_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_sats_request_t* sats_request)
{
    return mavlink_msg_sats_request_pack_chan(system_id, component_id, chan, msg, sats_request->cmd, sats_request->sat_id, sats_request->name, sats_request->slon, sats_request->llon, sats_request->llat, sats_request->auto_gps, sats_request->beacon, sats_request->down_freq, sats_request->down_symb, sats_request->down_polar, sats_request->up_freq, sats_request->up_polar, sats_request->res1, sats_request->res2);
}

/**
 * @brief Send a sats_request message
 * @param chan MAVLink channel to send the message
 *
 * @param cmd  the params of cmd.
 * @param sat_id   sat_id.
 * @param name   satellite name.
 * @param slon  satellite longitude.
 * @param llon  local longitude
 * @param llat  local latitude.
 * @param auto_gps  auto gps.
 * @param beacon   beacon mode.
 * @param down_freq  down frequency(MHz).
 * @param down_symb  down symb.
 * @param down_polar  down polar.
 * @param up_freq  up frequency(MHz).
 * @param up_polar  up polar.
 * @param res1  res1.
 * @param res2  res2.
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_sats_request_send(mavlink_channel_t chan, uint8_t cmd, uint32_t sat_id, const uint8_t *name, float slon, float llon, float llat, uint8_t auto_gps, uint8_t beacon, float down_freq, float down_symb, float down_polar, float up_freq, float up_polar, float res1, uint8_t res2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_SATS_REQUEST_LEN];
    _mav_put_uint32_t(buf, 0, sat_id);
    _mav_put_float(buf, 4, slon);
    _mav_put_float(buf, 8, llon);
    _mav_put_float(buf, 12, llat);
    _mav_put_float(buf, 16, down_freq);
    _mav_put_float(buf, 20, down_symb);
    _mav_put_float(buf, 24, down_polar);
    _mav_put_float(buf, 28, up_freq);
    _mav_put_float(buf, 32, up_polar);
    _mav_put_float(buf, 36, res1);
    _mav_put_uint8_t(buf, 40, cmd);
    _mav_put_uint8_t(buf, 105, auto_gps);
    _mav_put_uint8_t(buf, 106, beacon);
    _mav_put_uint8_t(buf, 107, res2);
    _mav_put_uint8_t_array(buf, 41, name, 64);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SATS_REQUEST, buf, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
#else
    mavlink_sats_request_t packet;
    packet.sat_id = sat_id;
    packet.slon = slon;
    packet.llon = llon;
    packet.llat = llat;
    packet.down_freq = down_freq;
    packet.down_symb = down_symb;
    packet.down_polar = down_polar;
    packet.up_freq = up_freq;
    packet.up_polar = up_polar;
    packet.res1 = res1;
    packet.cmd = cmd;
    packet.auto_gps = auto_gps;
    packet.beacon = beacon;
    packet.res2 = res2;
    mav_array_memcpy(packet.name, name, sizeof(uint8_t)*64);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SATS_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
#endif
}

/**
 * @brief Send a sats_request message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_sats_request_send_struct(mavlink_channel_t chan, const mavlink_sats_request_t* sats_request)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_sats_request_send(chan, sats_request->cmd, sats_request->sat_id, sats_request->name, sats_request->slon, sats_request->llon, sats_request->llat, sats_request->auto_gps, sats_request->beacon, sats_request->down_freq, sats_request->down_symb, sats_request->down_polar, sats_request->up_freq, sats_request->up_polar, sats_request->res1, sats_request->res2);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SATS_REQUEST, (const char *)sats_request, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
#endif
}

#if MAVLINK_MSG_ID_SATS_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_sats_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint8_t cmd, uint32_t sat_id, const uint8_t *name, float slon, float llon, float llat, uint8_t auto_gps, uint8_t beacon, float down_freq, float down_symb, float down_polar, float up_freq, float up_polar, float res1, uint8_t res2)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, sat_id);
    _mav_put_float(buf, 4, slon);
    _mav_put_float(buf, 8, llon);
    _mav_put_float(buf, 12, llat);
    _mav_put_float(buf, 16, down_freq);
    _mav_put_float(buf, 20, down_symb);
    _mav_put_float(buf, 24, down_polar);
    _mav_put_float(buf, 28, up_freq);
    _mav_put_float(buf, 32, up_polar);
    _mav_put_float(buf, 36, res1);
    _mav_put_uint8_t(buf, 40, cmd);
    _mav_put_uint8_t(buf, 105, auto_gps);
    _mav_put_uint8_t(buf, 106, beacon);
    _mav_put_uint8_t(buf, 107, res2);
    _mav_put_uint8_t_array(buf, 41, name, 64);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SATS_REQUEST, buf, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
#else
    mavlink_sats_request_t *packet = (mavlink_sats_request_t *)msgbuf;
    packet->sat_id = sat_id;
    packet->slon = slon;
    packet->llon = llon;
    packet->llat = llat;
    packet->down_freq = down_freq;
    packet->down_symb = down_symb;
    packet->down_polar = down_polar;
    packet->up_freq = up_freq;
    packet->up_polar = up_polar;
    packet->res1 = res1;
    packet->cmd = cmd;
    packet->auto_gps = auto_gps;
    packet->beacon = beacon;
    packet->res2 = res2;
    mav_array_memcpy(packet->name, name, sizeof(uint8_t)*64);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SATS_REQUEST, (const char *)packet, MAVLINK_MSG_ID_SATS_REQUEST_MIN_LEN, MAVLINK_MSG_ID_SATS_REQUEST_LEN, MAVLINK_MSG_ID_SATS_REQUEST_CRC);
#endif
}
#endif

#endif

// MESSAGE SATS_REQUEST UNPACKING


/**
 * @brief Get field cmd from sats_request message
 *
 * @return  the params of cmd.
 */
static inline uint8_t mavlink_msg_sats_request_get_cmd(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  40);
}

/**
 * @brief Get field sat_id from sats_request message
 *
 * @return   sat_id.
 */
static inline uint32_t mavlink_msg_sats_request_get_sat_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field name from sats_request message
 *
 * @return   satellite name.
 */
static inline uint16_t mavlink_msg_sats_request_get_name(const mavlink_message_t* msg, uint8_t *name)
{
    return _MAV_RETURN_uint8_t_array(msg, name, 64,  41);
}

/**
 * @brief Get field slon from sats_request message
 *
 * @return  satellite longitude.
 */
static inline float mavlink_msg_sats_request_get_slon(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  4);
}

/**
 * @brief Get field llon from sats_request message
 *
 * @return  local longitude
 */
static inline float mavlink_msg_sats_request_get_llon(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field llat from sats_request message
 *
 * @return  local latitude.
 */
static inline float mavlink_msg_sats_request_get_llat(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field auto_gps from sats_request message
 *
 * @return  auto gps.
 */
static inline uint8_t mavlink_msg_sats_request_get_auto_gps(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  105);
}

/**
 * @brief Get field beacon from sats_request message
 *
 * @return   beacon mode.
 */
static inline uint8_t mavlink_msg_sats_request_get_beacon(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  106);
}

/**
 * @brief Get field down_freq from sats_request message
 *
 * @return  down frequency(MHz).
 */
static inline float mavlink_msg_sats_request_get_down_freq(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field down_symb from sats_request message
 *
 * @return  down symb.
 */
static inline float mavlink_msg_sats_request_get_down_symb(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field down_polar from sats_request message
 *
 * @return  down polar.
 */
static inline float mavlink_msg_sats_request_get_down_polar(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field up_freq from sats_request message
 *
 * @return  up frequency(MHz).
 */
static inline float mavlink_msg_sats_request_get_up_freq(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field up_polar from sats_request message
 *
 * @return  up polar.
 */
static inline float mavlink_msg_sats_request_get_up_polar(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  32);
}

/**
 * @brief Get field res1 from sats_request message
 *
 * @return  res1.
 */
static inline float mavlink_msg_sats_request_get_res1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  36);
}

/**
 * @brief Get field res2 from sats_request message
 *
 * @return  res2.
 */
static inline uint8_t mavlink_msg_sats_request_get_res2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  107);
}

/**
 * @brief Decode a sats_request message into a struct
 *
 * @param msg The message to decode
 * @param sats_request C-struct to decode the message contents into
 */
static inline void mavlink_msg_sats_request_decode(const mavlink_message_t* msg, mavlink_sats_request_t* sats_request)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    sats_request->sat_id = mavlink_msg_sats_request_get_sat_id(msg);
    sats_request->slon = mavlink_msg_sats_request_get_slon(msg);
    sats_request->llon = mavlink_msg_sats_request_get_llon(msg);
    sats_request->llat = mavlink_msg_sats_request_get_llat(msg);
    sats_request->down_freq = mavlink_msg_sats_request_get_down_freq(msg);
    sats_request->down_symb = mavlink_msg_sats_request_get_down_symb(msg);
    sats_request->down_polar = mavlink_msg_sats_request_get_down_polar(msg);
    sats_request->up_freq = mavlink_msg_sats_request_get_up_freq(msg);
    sats_request->up_polar = mavlink_msg_sats_request_get_up_polar(msg);
    sats_request->res1 = mavlink_msg_sats_request_get_res1(msg);
    sats_request->cmd = mavlink_msg_sats_request_get_cmd(msg);
    mavlink_msg_sats_request_get_name(msg, sats_request->name);
    sats_request->auto_gps = mavlink_msg_sats_request_get_auto_gps(msg);
    sats_request->beacon = mavlink_msg_sats_request_get_beacon(msg);
    sats_request->res2 = mavlink_msg_sats_request_get_res2(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_SATS_REQUEST_LEN? msg->len : MAVLINK_MSG_ID_SATS_REQUEST_LEN;
        memset(sats_request, 0, MAVLINK_MSG_ID_SATS_REQUEST_LEN);
    memcpy(sats_request, _MAV_PAYLOAD(msg), len);
#endif
}
